IGNITE-27900 Use message serializer for CacheStatisticsClearMessage, ChangeGlobalStateMessage, DynamicCacheChangeBatch, ClientCacheChangeDummyDiscoveryMessage#12780
Conversation
3325785 to
f039f49
Compare
| @@ -41,13 +46,23 @@ public class CacheStatisticsClearMessage implements DiscoveryCustomMessage { | |||
| private final IgniteUuid id = IgniteUuid.randomUuid(); | |||
There was a problem hiding this comment.
All non-transient, non-static fields should be serialized. Also, inititalization of UUID can be moved to non default constructor.
f039f49 to
5f6f3fa
Compare
5f6f3fa to
8bef005
Compare
| Map<String, DynamicCacheChangeRequest> startReqs; | ||
|
|
||
| /** */ | ||
| @Order(value = 1, method = "startRequestsBytes") |
There was a problem hiding this comment.
Use MarshallableMessage instead
|
|
||
| /** {@inheritDoc} */ | ||
| @Override public void prepareMarshal(Marshaller marsh) throws IgniteCheckedException { | ||
| if (startReqs != null && startRequestsBytes == null) |
There was a problem hiding this comment.
Any reason to check startRequestsBytes == null?
39a7d6d to
ea4e3a1
Compare
ea4e3a1 to
2de8059
Compare
2de8059 to
c9fd669
Compare
Possible compatibility issues. Please, check rolling upgrade casesThis PR modifies protected classes (with Order annotation). Affected files:
|
c9fd669 to
adc27d0
Compare
| // TODO: Should be removed in https://issues.apache.org/jira/browse/IGNITE-27627 | ||
| public void prepareMarshal(Marshaller marsh) throws IgniteCheckedException { | ||
| if (msg instanceof Message) | ||
| if (msg instanceof Message) { |
There was a problem hiding this comment.
MarshallableMessage will be properly processed in MessageSerializer, this change is unnecessary.
| return; | ||
|
|
||
| if (serMsg != null) | ||
| if (serMsg != null) { |
There was a problem hiding this comment.
MarshallableMessage will be properly processed in MessageSerializer, this change is unnecessary.
| super(false); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
Why do we need this change in this PR?
| // (possibly due to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7122846). | ||
| if (U.isMacOs()) | ||
| spi.setLocalAddress(F.first(U.allLocalIps())); | ||
| if (U.isMacOs()) { |
There was a problem hiding this comment.
Why o we need this change in this PR?
|
|
||
| msg = metricsMsgFilter.pollActualMessage(laps, msg); | ||
|
|
||
| // pollActualMessage() can return null when actualFirstLapMetricsUpdate or actualSecondLapMetricsUpdate |
There was a problem hiding this comment.
Are there any existing NPE case?
|
|
||
| try { | ||
| if (msg instanceof MarshallableMessage) | ||
| ((MarshallableMessage)msg).prepareMarshal(spi.marshaller()); |
There was a problem hiding this comment.
This already will be done in corresponding MessageSerializer, why do we need this?
# Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStatisticsClearMessage.java
# Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java
…ryMessage # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java
# Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java
adc27d0 to
d7c283a
Compare
d7c283a to
8644e44
Compare
# Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java
|




Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.